<h1><%= l(:title) %> - <%= l(:search)%></h1>

<% if flash[:notice] %><p style="color: green"><%= flash[:notice] %></p><% end %>

<%= render(:partial => "search_box") %>

<% if @results.length > 0%>

<hr class="divider"/>

<p><%= l(:results) %> <b><%= @offset %> - <%= (@offset + @limit) < @hit_count ? (@offset + @limit) : @hit_count %></b> <%= l(:of) %> <b><%= @hit_count %></b> <%= l(:for) %> <b><%= @terms %></b></p>

<div id="results">
<%= render(:partial => "result", :collection => @results) %>
</div>

<div>
<b><%= (link_to(l(:previous), {:action => "results", :terms => URI.unescape(@term_list), :locale => @language, :limit => @limit, :offset => @offset - @limit}, :rel => "nofollow") + "&nbsp;&nbsp;") if @offset > 0 %>
<%= (link_to(l(:next), {:action => "results", :terms => URI.unescape(@term_list),  :locale => @language,:limit => @limit, :offset => @offset + @limit}, :rel => "nofollow") if @results.size >= @limit )%>
</b>
</div>           

<p>
<a rel="nofollow" href="<%=@current_uri%>.rss<%=@url_terms%>" title="RSS for current page"><%= l(:rss) %></a> 
<a rel="nofollow" href="<%=@current_uri%>.rss<%=@url_terms%>" title="RSS for current page"><img src="/images/rss.gif" alt="RSS" title="RSS" border="0"></a> 
<a rel="nofollow" href="<%=@current_uri%>.xml<%=@url_terms%>" title="XML for current page"><%= l(:xml) %></a> 
<a rel="nofollow" href="<%=@current_uri%>.xml<%=@url_terms%>" title="XML for current page"><img src="/images/rss.gif" alt="XML" title="XML" border="0"></a> 
<a rel="nofollow" href="<%=@current_uri%>.atom<%=@url_terms%>" title="Atom for current page"><%= l(:atom) %></a> 
<a rel="nofollow" href="<%=@current_uri%>.atom<%=@url_terms%>" title="Atom for current page"><img src="/images/rss.gif" alt="Atom" title="Atom" border="0"></a> 
<a rel="nofollow" href="<%=@current_uri%>.rdf<%=@url_terms%>" title="RDF for current page"><%= l(:rdf) %></a> 
<a rel="nofollow" href="<%=@current_uri%>.rdf<%=@url_terms%>" title="RDF for current page"><img src="/images/rdf.gif" alt="RDF" title="RDF" border="0"></a>
</p>
<% else %>
<p><%= l(:no_hits) %></p>
<% end %>